<?php /* Smarty version 2.6.18, created on 2008-02-26 23:20:36
         compiled from admin_criteres.tpl */ ?>
<script type="text/javascript" >
<?php echo '
	function loadCatCritere() {
		var no = document.getElementById("noCatCritere");
		var noCatCritere = no.options[no.selectedIndex].value;
		window.location.replace("'; ?>
<?php echo $_SERVER['PHP_SELF']; ?>
<?php echo '?noCatCritere=" + noCatCritere);
	}

	function loadCritere() {
		var no = document.getElementById("noCritere");
		var noCritere = no.options[no.selectedIndex].value;
		window.location.replace("'; ?>
<?php echo $_SERVER['PHP_SELF']; ?>
<?php echo '?noCritere=" + noCritere);
	}

'; ?>

</script>
<span class="title_blue">Administration des critères d'évaluations</span><br />
<h2>Catégories de critères</h2>
<?php if ($this->_tpl_vars['modeModifCat'] == 1): ?>
	<div style="text-align:left;"><a href="<?php echo $_SERVER['PHP_SELF']; ?>
?delCat=<?php echo $this->_tpl_vars['listeCatCritere']['noCategorieCritere']; ?>
" title="Supprimer cette montagne">Supprimer</a></div>
<?php endif; ?>
<form name="form_cat_critere" action="<?php echo $_SERVER['PHP_SELF']; ?>
" method="post" >
	<fieldset>
		Liste des catégories : 
		<select name="noCatCritere" id="noCatCritere" onChange="loadCatCritere()" >
			<option value="0" >-- Choisissez une catégorie --</option>
			<?php $_from = $this->_tpl_vars['listCritereCat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['catCritere']):
?>
				<option value="<?php echo $this->_tpl_vars['catCritere']['noCategorieCritere']; ?>
"><?php echo $this->_tpl_vars['catCritere']['categorie']; ?>
</option>
			<?php endforeach; endif; unset($_from); ?>
		</select>
		<br><br>
		<?php if ($this->_tpl_vars['modeModifCat'] == 1): ?>
			<input type="hidden" name="noCatCritereRecu" id="noCatCritereRecu" value="<?php echo $this->_tpl_vars['listeCatCritere']['noCategorieCritere']; ?>
" >
		<?php endif; ?>
		Nom de la catégorie : <input type="text" name="descCatCritere" id="descCatCritere" value="<?php echo $this->_tpl_vars['listeCatCritere']['categorie']; ?>
" >
		<input type="submit" name="btn_ajout_cat" id="btn_ajout_cat" value="Ajouter / Modifier" >
	</fieldset>
</form>

<h2>Critères d'évaluation</h2>
<?php if ($this->_tpl_vars['modeModifCritere'] == 1): ?>
	<div style="text-align:left;"><a href="<?php echo $_SERVER['PHP_SELF']; ?>
?delCritere=<?php echo $this->_tpl_vars['criteres']['noCritere']; ?>
" title="Supprimer cette montagne">Supprimer</a></div>
<?php endif; ?>
<form name="form_critere" action="<?php echo $_SERVER['PHP_SELF']; ?>
" method="post" >
	<fieldset>
		<?php if ($this->_tpl_vars['modeModifCritere'] == 1): ?>
			<input type="hidden" name="noCritereRecu" id="noCritereRecu" value="<?php echo $this->_tpl_vars['criteres']['noCritere']; ?>
">
		<?php endif; ?>
		Liste des critères présents : 
		<select name="noCritere" id="noCritere"  onChange="loadCritere()">
			<option value="0">-- Choisissez un critère --</option>
			<?php $_from = $this->_tpl_vars['listCritere']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['critere']):
?>
				<option value="<?php echo $this->_tpl_vars['critere']['noCritere']; ?>
" ><?php echo $this->_tpl_vars['critere']['critere']; ?>
</option>
			<?php endforeach; endif; unset($_from); ?>
		</select><br /><br />
		Critère d'évaluation : <input type="text" name="nomCritere" id="nomCritere" size="65" value="<?php echo $this->_tpl_vars['criteres']['critere']; ?>
" >
		<br /><br />
		Catégorie de critère associée: 
		<select name="noCatAssocie" id="noCatAssocie">
			<?php $_from = $this->_tpl_vars['listCritereCat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['catCritere']):
?>
				<option value="<?php echo $this->_tpl_vars['catCritere']['noCategorieCritere']; ?>
" <?php if ($this->_tpl_vars['criteres']['categorieCritere'] == $this->_tpl_vars['catCritere']['noCategorieCritere']): ?> selected="selected" <?php endif; ?> ><?php echo $this->_tpl_vars['catCritere']['categorie']; ?>
</option>
			<?php endforeach; endif; unset($_from); ?>
		</select>
		<br /><br />
		<input type="submit" name="btn_ajout_critere" id="btn_ajout_critere" value="Ajouter / Modifier" >
	</fieldset>
</form>
<br /><br />


